function Update() 
{
    var hit : RaycastHit;

	var agentSet : AgentSet = GameObject.Find("Main Camera").GetComponent("AgentSet");
    for (var thisAgent : Agent in agentSet.agents)
    {
	    var rayDirection : Vector3 = thisAgent.transform.position - transform.position;
	    
	    if (Physics.Raycast(transform.position, rayDirection, hit)) 
	    {
	        if (hit.transform.position == thisAgent.transform.position) 
	        {
	            thisAgent.isOnSight = true;
	        } 
	        else 
	        {
	        	thisAgent.isOnSight = false;
	        }
	    }
    }
}
